import Icon from '@/components/icon'

export default [
  {
    label: '姓名',
    prop: 'name',
    component: 'input',
    value: '初始值',
    componentProps: {
      placeholder: '请输入姓名',
      slots: [{
        name: 'prepend',
        content: () => <Icon name="User" />,
      }, {
        name: 'append',
        content: () => '这是append slot',
      }],
    },
  },
  {
    label: '地点',
    prop: 'place',
    component: 'select',
    value: '',
    componentProps: {
      placeholder: '选择地点',
      options: [
        { label: '北京', value: 'beijing' },
        { label: '上海', value: 'shanghai' },
        { label: '广州', value: 'guangzhou' },
        { label: '深圳', value: 'shenzhen' },
      ],
    },
  },
  {
    label: '交通方式',
    prop: 'transportation',
    component: 'radio',
    value: 'self-driving',
    componentProps: {
      options: [
        { label: '公交', value: 'bus' },
        { label: '地铁', value: 'subway' },
        { label: '自驾', value: 'self-driving' },
        { label: '骑行', value: 'cycling' },
        { label: '飞机', value: 'plane' },
      ],
    },
  },
  {
    label: '开关',
    prop: 'enable',
    component: 'switch',
    value: 'open',
    componentProps: {
      activeText: '开',
      inactiveText: '关',
      activeValue: 'open',
      inactiveValue: 'close',
      inlinePrompt: true,
    },
  },
  {
    label: '食物',
    prop: 'foods',
    component: 'checkbox',
    value: ['option2'],
    componentProps: {
      options: [
        { label: '食物1', value: 'option1' },
        { label: '食物2', value: 'option2' },
        { label: '食物3', value: 'option3' },
      ],
    },
  },
  {
    label: '日期选择',
    prop: 'date',
    component: 'date-picker',
    value: '2025-01-18',
    componentProps: {
      type: 'date',
      valueFormat: 'YYYY-MM-DD',
    },
  },
  {
    label: '时间选择',
    prop: 'time',
    component: 'time-picker',
    value: '16:40:40',
    componentProps: {
      valueFormat: 'HH:mm:ss',
      placeholder: '选择时间',
    },
  },
]